<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'编辑应收/付款','search'=>'N'))}
	<form method='post' id="form_data" name="form_data" enctype="multipart/form-data"   class="well form-horizontal">
		<input type="hidden" id="ajax" name="ajax" value="0">
		<input type="hidden" id="opmode" name="opmode" value="edit">
		<input type="hidden" id="id" name="id" value="{$result.id}">
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="partner">客户名称：</label>
			<div class="col-sm-8">
				<input  class="form-control " type="text" id="name" name="name" check="require" msg="请输入客户名称"  value="{$result.name}" />
			</div>
		</div>
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" >类别：</label>
			<div class="col-sm-8">
				<select id="type" name="type" class="form-control" check="require" msg="请选择类别">
					<option value="" >请选择类别</option>
					<foreach name="type" item="vo">
						<option value="{$key}" <if condition="$key eq $result[type]">selected</if>>{$vo}</option>		
					</foreach>
				</select>
			</div>
		</div>
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="income">金额：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="money" check="require" msg="请输入金额" value="{$result.money}"  />
			</div>
		</div>
		<div class="form-group">
			<div class="form-actions col-sm-10 col-sm-offset-2">
				<input class="btn btn-sm btn-primary" type="button" value="保存" onclick="save();">
				<input class="btn btn-sm btn-default" type="button" value="取消" onclick="go_return_url();">
			</div>
		</div>
	</form>
</block>
<block name="js">
	<script>
		function save() {
			sendForm("form_data", "{:U('editSave')}");
		}
	</script>
</block>